<nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <div class="navbar-header">
      <%# <%= image_tag("logo") %>
      <%= link_to "PT Jobs", root_path, class:"navbar-brand" %>
    </div>

    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li><%= link_to "All Jobs", jobs_path %></li>
        <% if current_user %>
        <li><%= link_to "My Resumes", user_resumes_path(current_user) %></li>
        <% end %>
      </ul>

      <ul class="nav navbar-nav navbar-right">

          <% if !current_user %>
          <li><%= link_to "Login", new_user_session_path %></li>
          <li><%= link_to "Regist", new_user_registration_path %></li>
          <% else %>
        <li class="dropdown">
          <a class="dropdown-toggle" data-toggle="dropdown" role="button">
            Hi, <%= current_user.email %> <span class="caret"></span>
          </a>
          <ul class="dropdown-menu">
            <% if current_user.admin? %>
              <li><%= link_to "Admin Panel", admin_jobs_path %></li>
            <% end %>
            <li><a role="separator" class="divider">User name</a></li>
            <li><%= link_to "Logout", destroy_user_session_path, method: :delete %></li>
          </ul>
          <% end %>
        </li>
      </ul>
    </div>
  </div>
</nav>
